<div class="form">

<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'accesorio-form',
	'enableAjaxValidation'=>false,
	'focus'=>array($a,'tipo'),
)); ?>

	<p class="note">Fields with <span class="required">*</span> are required.</p>

	<?php 
	if ($a->isNewRecord==false) 
		$b=Modelo::model()->findByPk($a->idModelo);
	echo $form->errorSummary(array($a,$b)); 
	?>

	<div class="row">
		<?php echo $form->labelEx($a,'tipo'); ?>
		(Auricular, funda, cargador, etc.)<br>
		<?php echo $form->textField($a,'tipo',array('size'=>30,'maxlength'=>30)); ?>
		<?php echo $form->error($a,'tipo'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($b,'idMarca'); ?>
		<?php echo CHtml::activeDropDownList($b, 'idMarca', Marca::model()->Nombre); ?>
		<?php echo $form->error($b,'idMarca'); ?>
	</div>	

	<div class="row">
		<?php echo $form->labelEx($b,'nombre'); ?>
		<?php echo $form->textField($b,'nombre',array('size'=>20,'maxlength'=>20)); ?>
		<?php echo $form->error($b,'nombre'); ?>
	</div>

	<div class="row buttons">
		<?php echo CHtml::submitButton($a->isNewRecord ? 'Create' : 'Save'); ?>
	</div>

<?php $this->endWidget(); ?>

</div><!-- form -->